import Vue from 'vue'
import Router from 'vue-router'
import index from '@/components/index'    // 商城首页
import detail from '@/components/shopping/detail.vue' // 商品详情页
import shoppingCart from '@/components/shopping/shoppingCart.vue' // 商品购物车
import center from '@/components/shopping/center.vue' // 个人中心(患者)
import pay from '@/components/shopping/pay.vue' // 订单支付页面
import address from '@/components/shopping/address.vue' // 地址（患者收货）
import addAddress from '@/components/shopping/add/address.vue' // 添加收货地址（患者收货）
import order from '@/components/shopping/order' // 订单列表
import orderDetail from '@/components/shopping/orderDetail' // 订单列表
import dietitian from '@/components/shopping/dietitian' // 我的营养师
import dietitianInfo from '@/components/dietitian/info' // 营养师
import myPatients from '@/components/dietitian/myPatients' // 我的患者
import code from '@/components/dietitian/code' // 患者邀请二维码
import patients from '@/components/dietitian/patients' // 患者信息
import patientsOrder from '@/components/dietitian/order' // 患者信息
import remind from '@/components/dietitian/remind' // 患者信息
import health from '@/components/dietitian/health' // 健康档案
import note from '@/components/dietitian/note' // 设置备注
import followInfo from '@/components/follow/info' // 随访专员个人中心
import record from '@/components/follow/record' // 随访记录
import dealersInfo from '@/components/dealers/info' // 经销商个人中心
import hospital from '@/components/dealers/hospital' // 我的医院
import orderlist from '@/components/dealers/orderlist' // 营养师订单列表
import hospitalDetail from '@/components/dealers/hospitalDetail' // 医院详情
import guideIndex from '@/components/guide/index' // 营养指导列表
import guideDetail from '@/components/guide/detail' // 营养指导详情
import family from '@/components/dietitian/family' // 家庭自查
import screeing from '@/components/screening/screeing' // 营养筛查
import screeingTwo from '@/components/screening/screeingTwo' // 营养筛查
import checklist from '@/components/shopping/checklist' // 我的自查表
import home from '@/components/dietitian/home' // 家庭自查列表
import fillIn from '@/components/dietitian/familyChild/fillIn' // 家庭自查列表
import personal from '@/components/dietitian/familyChild/personal' // 家庭
import members from '@/components/dietitian/familyChild/members' // 家庭
import occupyList from '@/components/occupy/list' // 居家自查

Vue.use(Router)

export default new Router({
    // mode: 'history',
    routes: [
        {
            path: '/',
            name: 'index',
            component: index,
            meta:{
                title:'营养中心',
            }
        },
        {
            path: '/shop/detail/:id',
            name: 'detail',
            component: detail,
            meta:{
                title:'商品详情页',
            }
        },
        {
            path: '/shop/cart',
            name: 'shoppingCart',
            component: shoppingCart,
            meta:{
                title:'购物车',
            }
        },
        {
            path: '/shop/center',
            name: 'center',
            component: center,
            meta:{
                title:'个人中心',
            }
        },
        {
            path: '/shop/pay',
            name: 'pay',
            component: pay,
            meta:{
                title:'确认订单'
            }
        },
        {
            path: '/shop/address',
            name: 'address',
            component: address,
            meta:{
                title:'地址'
            }
        },
        {
            path: '/shop/address/add',
            name: 'addAddress',
            component: addAddress,
            meta:{
                title:'添加地址'
            }
        },
        {
            path: '/shop/order',
            name: 'order',
            component: order,
            meta:{
                title:'我的订单'
            }
        },
        {
            path: '/shop/orderDetail/:orderId',
            name: 'orderDetail',
            component: orderDetail,
            meta:{
                title:'订单详情'
            }
        },
        {
            path: '/shop/dietitian',
            name: 'dietitian',
            component: dietitian,
            meta:{
                title:'营养师'
            }
        },
        {
            path: '/dietitian/info',
            name: 'dietitianInfo',
            component: dietitianInfo,
            meta:{
                title:'个人中心'
            }
        },
        {
            path: '/dietitian/myPatients',
            name: 'myPatients',
            component: myPatients,
            meta:{
                title:'我的患者'
            }
        },
        {
            path: '/dietitian/code',
            name: 'code',
            component: code,
            meta:{
                title:'邀请患者二维码'
            }
        },
        {
            path: '/dietitian/patients',
            name: 'patients',
            component: patients,
            meta:{
                title:'患者信息'
            }
        },
        {
            path: '/dietitian/order',
            name: 'patientsOrder',
            component: patientsOrder,
            meta:{
                title:'患者订单'
            }
        },
        {
            path: '/dietitian/remind',
            name: 'remind',
            component: remind,
            meta:{
                title:'预约提醒'
            }
        },
        {
            path: '/dietitian/health',
            name: 'health',
            component: health,
            meta:{
                title:'健康档案'
            }
        },
        {
            path: '/dietitian/note',
            name: 'note',
            component: note,
            meta:{
                title:'设置备注'
            }
        },
        {
            path: '/follow/info',
            name: 'followInfo',
            component: followInfo,
            meta:{
                title:'随访专员',
            }
        },
        {
            path: '/follow/record',
            name: 'record',
            component: record,
            meta:{
                title:'随访记录',
            }
        },
        {
            path: '/dealers/info',
            name: 'dealersInfo',
            component: dealersInfo,
            meta:{
                title:'个人中心',
            }
        },
        {
            path: '/dealers/hospital',
            name: 'hospital',
            component: hospital,
            meta:{
                title:'我的医院',
            }
        },
        {
            path: '/dealers/orderlist',
            name: 'orderlist',
            component: orderlist,
            meta:{
                title:'雯雯',
            }
        },
        {
            path: '/dealers/hospitalDetail',
            name: 'hospitalDetail',
            component: hospitalDetail,
            meta:{
                title:'医院详情',
            }
        },
        {
            path: '/guide/index',
            name: 'guideIndex',
            component: guideIndex,
            meta:{
                title:'营养指导',
            }
        },
        {
            path: '/guide/detail',
            name: 'guideDetail',
            component: guideDetail,
            meta:{
                title:'详情页',
            }
        },
        {
            path: '/dietitian/family',
            name: 'family',
            component: family,
            meta:{
                title:'家庭自查',
            }
        },
        {
            path: '/screening/screeing',
            name: 'screeing',
            component: screeing,
            meta:{
                title:'营养筛查',
            }
        },
        {
            path: '/screening/screeingTwo',
            name: 'screeingTwo',
            component: screeingTwo,
            meta:{
                title:'营养筛查',
            }
        },
        {
            path: '/shopping/checklist',
            name: 'checklist',
            component: checklist,
            meta:{
                title:'我的自查表',
            }
        },
        {
            path: '/dietitian/home',
            name: 'home',
            component: home,
            meta:{
                title:'家庭自查',
            }
        },
        {
            path: '/dietitian/fillIn',
            name: 'fillIn',
            component: fillIn,
            meta:{
                title:'家庭自查',
            }
        },
        {
            path: '/dietitian/personal',
            name: 'personal',
            component: personal,
            meta:{
                title:'家庭自查',
            }
        }, 
        {
            path: '/dietitian/members',
            name: 'members',
            component: members,
            meta:{
                title:'家庭自查',
            }
        }, 
        {
            path: '/occupy/list',
            name: 'occupyList',
            component: occupyList,
            meta:{
                title:'居家自查',
            }
        }, 
    ]
})
